/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 */

#ifndef __TSIN_INPUT_INPUT_HPP__
#define __TSIN_INPUT_INPUT_HPP__

#include <tsin/input/common.hpp>

#include <tsin/util/EventSource.hpp>
#include <tsin/input/InputEvent.hpp>

namespace tsin {

        class InputCallback;

        /**
         * @class Input
         * @ingroup input
         */
        class INPUT_DLLEXPORT Input : public EventSource
        {
                friend class InputCallback;
        public:
                Input();

                virtual void prepareEvent() = 0;
                virtual bool pollEvent(InputEvent &event) = 0;

                void triggerEvents();
                void *getEventInfo();

        protected:
                InputCallback *head, *tail;
                InputEvent event;
        };

}

#endif /* __TSIN_INPUT_INPUT_HPP__ */
